summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nfp/nfp_user.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/nfp/nfp_user.cpp')
-rw-r--r--src/core/hle/service/nfp/nfp_user.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/nfp/nfp_user.cpp b/src/core/hle/service/nfp/nfp_user.cpp
index 2fe3c0ea0..49816b4c7 100644
--- a/src/core/hle/service/nfp/nfp_user.cpp
+++ b/src/core/hle/service/nfp/nfp_user.cpp
@@ -104,9 +104,9 @@ void IUser::ListDevices(Kernel::HLERequestContext& ctx) {
}
std::vector<u64> nfp_devices;
- const std::size_t max_allowed_devices = ctx.GetWriteBufferSize() / sizeof(u64);
+ const std::size_t max_allowed_devices = ctx.GetWriteBufferNumElements<u64>();
- for (auto& device : devices) {
+ for (const auto& device : devices) {
if (nfp_devices.size() >= max_allowed_devices) {
continue;
}
@@ -115,7 +115,7 @@ void IUser::ListDevices(Kernel::HLERequestContext& ctx) {
}
}
- if (nfp_devices.size() == 0) {
+ if (nfp_devices.empty()) {
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(DeviceNotFound);
return;